<template>
	<view class="warp">
		<view class="container">
			<view class="title">基本信息</view>
			<view class="content">
				<view class="">项目编号<text>{{projectMsg.projectCode}}</text></view>
				<view class="">项目名称<text>{{projectMsg.projectName}}</text></view>
				<view class="">市政工程<text>{{projectMsg.isGovement}}</text></view>
				<view class="">重点项目<text>{{projectMsg.isImportant}}</text></view>
				<view class="">项目状态<text>{{projectMsg.projectStatus}}</text></view>
				<view class="">项目类型<text>{{projectMsg.projectType}}</text></view>
				<view class="">工程地址<text>{{projectMsg.address}}</text></view>
				<view class="">建设单位<text>{{projectMsg.constructionUnit}}</text></view>
				<view class="">项目负责人<text>{{projectMsg.leader}}</text><text></text></view>
				<view class="">总监理工程师<text>{{projectMsg.supervisor }}</text></view>
			</view>
			<view class="title">开工时间</view>
			<view class="content">
				<view class="">计划开工时间<text>{{projectMsg.planStartDate}}</text></view>
				<view class="">计划竣工时间<text>{{projectMsg.planEndDate}}</text></view>
				<view class="">实际开工时间<text>{{projectMsg.realStartDate}}</text></view>
				<view class="">实际竣工时间<text>{{projectMsg.realEndDate}}</text></view>
			</view>
			<view class="title">建设规模</view>
			<view class="content">
				<view class="">总长度(米)<text>{{projectMsg.totalLength}}</text></view>
				<view class="">建筑面积(平方米)<text>{{projectMsg.area}}</text></view>
				<view class="">地上层数<text>{{projectMsg.aboveFloors}}</text></view>
				<view class="">地下层数<text>{{projectMsg.underFloors}}</text></view>
			</view>
		</view>
	</view>
</template>

<script setup>
	import {onMounted,reactive,getCurrentInstance} from 'vue'
  const { proxy } = getCurrentInstance();
	const projectId = uni.getStorageSync('projectInfo').id
	const projectMsg = reactive({})
	onMounted(() => {
		proxy.http.get(`/project-overview/getProjectOverviewById?id=${projectId}`).then(res => {
			Object.assign(projectMsg, res.data.data);
		})
	})
</script>

<style lang="scss" scoped>
  .warp{
    background-color: #fafafa;
    .container {
      box-sizing: border-box;
      padding-bottom: 5px;
    	.title {
    		font-weight: bold;
        font-size: 17px;
        margin: 10px;
    		// font-size: 1.2rem;
    		color: #474747;
    	}
    	.content {
    		background-color: white;
        text-indent: 10px;
    		color: #757575;
    		view {
    			margin: 10px 0;
    		}
    	}
    }
    text {
    	margin: 0 20rpx;
    }
  }
	
</style>